package com.bole.dao;

import com.bole.pojo.TbContentDo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface ContentDao extends JpaRepository<TbContentDo, Long> {

    @Transactional
    @Modifying
    @Query(value = "delete  from TbContentDo t  where  t.id in (:idss) ")
    void deleteInBatchById(@RequestParam("idss") List<Long> idss);

    List<TbContentDo> findByContentTypeId(Long id);




}
